const state = {
  dept: undefined, // deptInfo
  display: true,
  currentNode: undefined
}
const mutations = {
  SET_DISPLAY: (state, value) => {
    state.display = value
  },
  GET_DISPLAY: state => {
    return state.display
  },
  SET_DEPT: (state, value) => {
    state.dept = value
  },
  GET_DEPT: state => {
    return state.dept
  },
  SET_NODE: (state, value) => {
    state.currentNode = value
  },
  GET_NODE: state => {
    return state.currentNode
  }
}
const actions = {
  UPDATE_NODE ({ commit }, value) {
    setTimeout(() => {
      commit('SET_NODE', value)
    }, 2000)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
